import 'package:flutter/material.dart';
import 'index.dart';

class Home extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _HomeState();
  }
}

class _HomeState extends State<Home> {
//  AppLifecycleState _lastLifecyleState;

  @override
  void initState() {
//    tagInStateWithLifecycle = "_TestRouteState";
    print('work_desk_tab_111');
    super.initState();
//    WidgetsBinding.instance.addObserver(this);
  }

//  @override
//  void onResume() {
//    print('resume');
//    super.onResume();
//  }
//
//  @override
//  void onPause() {
//    print('resume');
//    super.onPause();
//  }

  @override
  void deactivate() {
    print('deactivate');
//    if (_lastLifecyleState == AppLifecycleState.resumed) {
//      print('deactivate');
//    }
    var bool = ModalRoute.of(context).isCurrent;
    if (bool) {
      print('done');
    }
    super.deactivate();
  }

//  @override
//  void didChangeAppLifecycleState(AppLifecycleState state) {
//    super.didChangeAppLifecycleState(state);
////    print('state${state}');
////    setState(() {
////      _lastLifecyleState = state;
////    });
//  }

  @override
  void dispose() {
//    WidgetsBinding.instance.removeObserver(this);
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Index();
  }
}
